<?php
// 连接处理
include '../init.php';

$action = $_POST['action'];
if ($action == 5 ) {
	$end_time = strtotime($_POST['end_time']);
	if ($end_time < time()) {
		show_msg(1,'有效时间应该是今天之后', 3, 'index.php?action='.$action);
		exit();
	}
	
	$linkid = $_POST['linkid'];
	// 修改数据库的值
	$data = array();
	$sql  = "UPDATE `flink_tb` SET status=1,end_time='{$end_time}' WHERE lid={$linkid};";
	if (!my_mysql_query($sql, $data)) {
		show_msg(1,'处理友情连接失败', 3, 'index.php?action='.$action);
		exit();
	}
	
	show_msg(0,'处理友情连接成功', 2, 'index.php?action='.$action);
	exit();
}


?>